function [PH,ax]=HisDecSoloPlot(XVec,HisDec,ColorList,SymmetryFlag,XType,ax)

%% Preliminary Setup
[Num_V,Num_Obs]     =   size(HisDec);

%% Positive and Negative Contribution
HD_Pos              =   max(HisDec,0);
HD_Neg              =   min(HisDec,0);
%% YAxis
% Actual Limits
YMax                =   max(sum(HD_Pos));
YMin                =   min(sum(HD_Neg));
if YMax==0 && YMin==0
    YMax            =   1e-2;
end
% Y-Axis Interval
YIntervalNum        =   3;
YRoundUnit          =   0.5;
YAbsMax             =   max(abs([YMax;YMin]));
YExpNum             =   floor(log(YAbsMax)/log(10));
YY_2digit           =   YAbsMax/(10^YExpNum);
YInterval           =   ceil(YY_2digit/YIntervalNum/YRoundUnit)*...
                        YRoundUnit*(10^YExpNum);
YAbsMax             =   YInterval*YIntervalNum;

% Strech the Limit by its Magintude and Grid Interval
if nargin<4 || SymmetryFlag~=1
    SymmetryFlag    =   0;
end

switch SymmetryFlag
    case 0
        if YMin>0
            YMax        =   YAbsMax;
            YMin        =   0;
            YTicksVec   =   (0:YInterval:YAbsMax)';
        elseif YMax>0
            YMax        =   ceil(YMax/YInterval)*YInterval;
            YMin        =   floor(YMin/YInterval)*YInterval;
            YTicksVec       =   [(YMin:YInterval:0)';...
                             (YInterval:YInterval:YMax)'];
        else
            YMax        =   0;
            YMin        =   floor(YMin/YInterval)*YInterval;
            YTicksVec   =   (-YAbsMax:YInterval:0)';
        end
    case 1
        YMax        =   YAbsMax;
        YMin        =   -YAbsMax;
        YTicksVec   =   [(YMin:YInterval:0)';(YInterval:YInterval:YMax)'];
end

%% XAxis
% Actual Limit
XMax                =   max(XVec);
XMin                =   min(XVec);

% X-Axis Interval
XIntervalNum        =   6;
if nargin<5 || strcmp(XType,'Datetime')
    XType       =   'Datetime';
end

switch XType
    case 'Numerical'
        XRoundUnit          =   1;
        XAbsMax             =   max(abs([XMax;XMin]));
        XExpNum             =   floor(log(XAbsMax)/log(10));
        XX_2digit           =   XAbsMax/(10^XExpNum);
        XInterval           =   ceil(XX_2digit/YIntervalNum/XRoundUnit)*...
                                XRoundUnit*(10^XExpNum);
        XAbsMax             =   XInterval*XIntervalNum;
        XTicksVec           =   (-XAbsMax:XInterval:XAbsMax)';
        XTicksVec           =   XTicksVec((XTicksVec<=XMax) & (XTicksVec>=XMin));
    case 'Datetime'
        XRoundUnit          =   datetime(1,1,1)-datetime(0,1,1);
        XInterval           =   ceil((XMax-XMin)/XIntervalNum/XRoundUnit)*...
                                XRoundUnit;
        XTicksVec           =   (datetime(year(XMin)-1,12,31): ...
                                 XInterval: ...
                                 datetime(year(XMax),12,31))';
        XTicksVec           =   XTicksVec((XTicksVec<=XMax) & (XTicksVec>=XMin));
end


%% Generate the Graph
% Plots
if nargin<6
    ax              =   gca;
end

if Num_V==1
    ColorList   =   {ColorList};
end
% Positive Part
PH   =   bar(ax,XVec,HD_Pos','stacked', ...
            'barwidth',1,'Edgecolor','none','Linestyle','none');
if nargin>2 && ~isempty(ColorList)
    for ii=1:length(ColorList)
        PH(ii).FaceColor     =   ColorList{ii};
    end
end
hold on
% Negative Part
PH   =   bar(ax,XVec,HD_Neg','stacked', ...
            'barwidth',1,'Edgecolor','none','Linestyle','none');
if nargin>2 && ~isempty(ColorList)
    for ii=1:length(ColorList)
        PH(ii).FaceColor     =   ColorList{ii};
    end
end

if YMax>0 && YMin<0
    plot(ax,XVec,zeros(1,Num_Obs),'k-','linewidth',0.3);
end

hold off;

%% Setup Limits and Ticks
% Y-Axis
ax.YLim                 =   [YMin,YMax];
ax.YTick                =   YTicksVec;
ax.YAxis.Exponent       =   YExpNum;
ax.YAxis.TickLabelFormat=   '%.1g';
ax.YGrid                =   'on';
ax.YAxis.FontSize       =   14;

% X-Axis
ax.XLim                     =   [XMin,XMax];
ax.XTick                    =   XTicksVec;
switch XType
    case 'Numerical'
        ax.XAxis.Exponent           =   XExpNum;
        ax.XAxis.TickLabelFormat    =   '%.1g';
    case 'Datetime'
        datetick('x','yy','keepticks','keeplimits');
end
ax.XAxis.FontSize       =   14;
ax.XGrid                =   'on';

